﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://Microsoft.ConnectionEngine/Schemas/PatientRegister" elementFormDefault="qualified" targetNamespace="http://Microsoft.ConnectionEngine/Schemas/PatientRegister" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="PatientRequest" nillable="true">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="1" maxOccurs="1" name="UserCredentials" type="UserCredentials" />
				<xs:element minOccurs="1" maxOccurs="1" name="SearchRequest" type="SearchRequest" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="UserCredentials">
		<xs:sequence>
			<xs:element minOccurs="1" maxOccurs="1" name="UserName" type="xs:string" />
			<xs:element minOccurs="1" maxOccurs="1" name="Password" type="xs:string" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SearchRequest">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="PatientID" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="DateOfBirth" type="xs:dateTime" />
      <xs:element minOccurs="1" maxOccurs="1" name="DateOfDeath" type="xs:dateTime" />
      <xs:element minOccurs="0" maxOccurs="1" name="Gender" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Title" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="FamilyName" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="GivenName1" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="GivenName2" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="GivenName3" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddressLine1" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddressTownCity" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddressCountry" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddressCode" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>